package lab9.com.acme.bankapp.service.bank;

import lab9.com.acme.bankapp.domain.bank.Account;
import lab9.com.acme.bankapp.domain.bank.Bank;
import lab9.com.acme.bankapp.domain.bank.Client;



public class BankService
{
	
	private static final String MAX_AM = "\tMaximum amount to withdraw: ";
	public static final String CL = "Client #";


	public static void addClient(Bank curBank, Client newClient)
	{
		curBank.addClient(newClient);
	}
	
	
	public static void printMaximumAmountToWithdraw(Bank curBank)
	{
		Client[] curClients = curBank.getClients();
		for (int i = 0; i < curBank.getNumberOfClients(); i++)
		{
			System.out.println(CL + i);
			Account[] curClientAccounts = curClients[i].getAccounts();
			for (int j = 0; j < curClients[i].getNumberOfAccounts(); j++)
			{
				System.out.println("ID: " + curClientAccounts[0].getID() + 
						MAX_AM + 
						curClientAccounts[0].maximumAmountToWithdraw());
			}
		}
	}
}
